#include "addcountry.h"
#include "ui_addcountry.h"

addCountry::addCountry(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::addCountry)
{
    ui->setupUi(this);

    this->setWindowTitle("参赛国家注册");
    this->setWindowFlags(Qt::WindowCloseButtonHint);
}

addCountry::~addCountry()
{
    delete ui;
}

QString addCountry::getAlphaCode()
{
    return m_alphaCode;
}

QString addCountry::getChiName()
{
    return m_chiName;
}

QString addCountry::getEngName()
{
    return m_engName;
}

QString addCountry::getTeamSize()
{
    return m_teamSize;
}

QString addCountry::getGold()
{
    return m_gold;
}

QString addCountry::getSilver()
{
    return m_silver;
}

QString addCountry::getBronze()
{
    return m_bronze;
}

void addCountry::on_pushButton_clicked()
{
    m_alphaCode = ui->lineEdit->text();
    m_chiName = ui->lineEdit_2->text();
    m_engName = ui->lineEdit_4->text();
    m_teamSize = ui->lineEdit_3->text();
    m_gold = ui->lineEdit_5->text();
    m_silver = ui->lineEdit_6->text();
    m_bronze = ui->lineEdit_7->text();

    this->accept();
}

void addCountry::on_pushButton_2_clicked()
{
    this->reject();
}
